// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()
const db = cloud.database()

cloud.init({
  env: cloud.DYNAMIC_CURRENT_ENV
})
 
// 云函数获取数据写法
exports.main = async (event, context) => {
  return cloud.database().collection('subject').where({
    chapters:event.chapters,
     subject:event.subject, 
      }   // 存放 需要的id
 
      ).orderBy('_createTime','desc').skip(event.num).get()
}